body {
  font-family: "Microsoft YaHei", sans-serif;
  background: #1e1e2f;
  padding: 30px;
}

.character-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.char-card {
  width: 120px;
  height: 160px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.char-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.char-img {
  position: relative;
  z-index: 3;
  top: -1px;
  left: -13px;
  width: 150px;
  height: 136px;
  object-fit: contain;
}

.char-attribute {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 2;
}

.rank-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 26px;
  background-color: rgba(255, 255, 255, 0.96);
  text-align: center;
  line-height: 26px;
  z-index: 4;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rank-tag img {
  position: relative;
  width: 50px;
  top: -2px;
  left: -34px;
  height: 33px;
  object-fit: contain;
}

.char-level {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: #fff;
  color: #333;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  z-index: 5;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.char-info-box {
  text-align: center;
  margin-top: 6px;
  max-width: 120px;
}

.char-name {
  font-size: 14px;
  font-weight: bold;
  word-break: break-word;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #fff;
}
